Creating a two dimensional map of a work environment is a common problem for mobile robotic devices that is being solved in various ways. SLAM (simultaneous localization and mapping) is one solution for creating a map of a work environment. However, SLAM requires expensive technology and a lot of processing power and time. A need exists for simpler methods for constructing environment maps. In some cases, a mobile robotic device's performance can be greatly increased with only a few important pieces of information, such as the location or existence of walls or other flat surfaces. A need exists for a method to detect flat surfaces.